{{~
    name = x.name
    namespace_with_top_module = x.namespace_with_top_module
    comment = x.comment
    itemInfos = x.itemInfos
~}}

{{x.typescript_namespace_begin}}
{{~if comment != '' ~}}
/**
 * {{comment | html.escape}}
 */
{{~end~}}
export enum {{name}} {
    {{~for itemInfo in itemInfos ~}}
{{~if itemInfo.comment != '' ~}}
    /**
     * {{itemInfo.escape_comment}}
     */
{{~end~}}
    {{itemInfo.name}} = {{itemInfo.value}},
    {{~end~}}
}
{{x.typescript_namespace_end}}